#ifndef G3_COLOR_H
#define G3_COLOR_H

#include "types.h"

namespace G3 {

template<class CType>
class COL3 {
    public:
        COL3 (CType R = 1, CType G = 1, CType B = 1);

        CType r, g, b;

        COL3<CType>& operator=(const COL3<CType> &c);
};

template<class CType>
class COL4 {
    public:
        COL4 (CType R = 1, CType G = 1, CType B = 1, CType A = 1);

        CType r, g, b, a;

        COL4<CType>& operator=(const COL4<CType> &c);
};

//==============================================================================
// Explicit template instantiation
//==============================================================================
extern template class COL3<byte>;
extern template class COL3<int>;
extern template class COL3<float>;
extern template class COL3<double>;

extern template class COL4<byte>;
extern template class COL4<int>;
extern template class COL4<float>;
extern template class COL4<double>;

//==============================================================================
// Types
//==============================================================================
typedef COL3<byte>		COL3B;
typedef COL3<int>		COL3I;
typedef COL3<float>		COL3F;
typedef COL3<double>	COL3D;

typedef COL4<byte>		COL4B;
typedef COL4<int>		COL4I;
typedef COL4<float>		COL4F;
typedef COL4<double>	COL4D;

#define G3_BLACK_3F    G3::COL3F (0.0f, 0.0f, 0.0f)
#define G3_WHITE_3F    G3::COL3F (1.0f, 1.0f, 1.0f)
#define G3_GRAY_3F     G3::COL3F (0.5f, 0.5f, 0.5f)
#define G3_RED_3F      G3::COL3F (1.0f, 0.0f, 0.0f)
#define G3_GREEN_3F    G3::COL3F (0.0f, 1.0f, 0.0f)
#define G3_BLUE_3F     G3::COL3F (0.0f, 0.0f, 1.0f)
#define G3_CYAN_3F     G3::COL3F (0.0f, 1.0f, 1.0f)
#define G3_PINK_3F     G3::COL3F (1.0f, 0.0f, 1.0f)
#define G3_YELLOW_3F   G3::COL3F (1.0f, 1.0f, 0.0f)

}

#endif //G3_COLOR_H

